import axios from '~/axios'

// 添加交易申请合同
export function addTradeApplicationContractApi(data) {
    return axios.post('/basic/lindi/tradeApplicationContract/addTradeApplicationContract', data)
}

// 删除交易申请合同
export function deleteTradeApplicationContractByTradeApplicationContractIdApi(tradeApplicationContractId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/tradeApplicationContract/deleteTradeApplicationContractByTradeApplicationContractId',
        params: {
            tradeApplicationContractId: tradeApplicationContractId
        }
    })
}

// 修改交易申请合同
export function updateTradeApplicationContractByTradeApplicationContractIdApi(data) {
    return axios.put('/basic/lindi/tradeApplicationContract/updateTradeApplicationContractByTradeApplicationContractId', data)
}

// 分页查询交易申请合同列表
export function getPageTradeApplicationContractListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/tradeApplicationContract/getPageTradeApplicationContractList',
        params: params
    })
}

// 根据交易申请合同ID查询交易申请合同
export function getTradeApplicationContractByTradeApplicationContractIdApi(tradeApplicationContractId) {
    return axios.get(`/basic/lindi/tradeApplicationContract/getTradeApplicationContractByTradeApplicationContractId/${tradeApplicationContractId}`)
}

// 根据交易申请ID查询合同信息
export function getTradeApplicationContractByTradeApplicationIdApi(tradeApplicationId) {
    return axios.get(`/basic/lindi/tradeApplicationContract/getTradeApplicationContractByTradeApplicationId/${tradeApplicationId}`)
}

// 根据交易申请ID查询交易申请合同列表
export function getTradeApplicationContractListByTradeApplicationIdApi(tradeApplicationId) {
    return axios.get(`/basic/lindi/tradeApplicationContract/getTradeApplicationContractListByTradeApplicationId/${tradeApplicationId}`)
}

// 获取合同模板列表
export function getContractTemplateListApi() {
    return axios.get('/basic/lindi/tradeApplicationContract/getContractTemplateList')
}